Plot Data
library(ggplot2)
# raw data
ggplot(dataset, aes(x=Olaparib, y=Counts)) +
theme_bw() +
theme(panel.grid=element_blank(), text = element_text(size=14)) +
geom_smooth(method=lm, formula = y ~poly(x, 2), se=FALSE, aes(colour=siRNA)) +
geom_point(aes(colour=siRNA, shape=Experiment), size=2) +
facet_grid(. ~ genotype) +
xlab(label = "Olaparib (log10 nM)") +
scale_shape_manual(values=15:20) +
scale_color_manual(values=c("#000000","#FF0000"))

# NormCounts Linear
ggplot(dataset, aes(x=Olaparib, y=NormCounts, color=siRNA)) +
theme_bw() +
theme(panel.grid=element_blank(), text = element_text(size=14)) +
geom_point(aes(colour=siRNA), size=2) +
geom_smooth(method=lm, formula = y ~ x, se=FALSE) +
facet_grid(. ~ genotype) +
xlab(label = "Olaparib (log10 nM)") +
scale_color_manual(values=c("#000000","#FF0000"))

# NormCounts2 Linear
ggplot(dataset, aes(x=Olaparib, y=NormCounts2, color=siRNA)) +
theme_bw() +
theme(panel.grid=element_blank(), text = element_text(size=14)) +
geom_point(aes(colour=siRNA), size=2) +
geom_smooth(method=lm, formula = y ~ x, se=FALSE) +
facet_grid(. ~ genotype) +
xlab(label = "Olaparib (log10 nM)") +
scale_color_manual(values=c("#000000","#FF0000"))

# NormCounts Quadratic
ggplot(dataset, aes(x=Olaparib, y=NormCounts, color=siRNA)) +
theme_bw() +
theme(panel.grid=element_blank(), text = element_text(size=14)) +
geom_point(aes(colour=siRNA), size=2) +
geom_smooth(method=lm, formula = y ~poly(x, 2), se=FALSE) +
facet_grid(. ~ genotype) +
xlab(label = "Olaparib (log10 nM)")+
scale_color_manual(values=c("#000000","#FF0000"))

# NormCounts2 Quadratic
ggplot(dataset, aes(x=Olaparib, y=NormCounts2, color=siRNA)) +
theme_bw() +
theme(panel.grid=element_blank(), text = element_text(size=14)) +
geom_point(aes(colour=siRNA), size=2) +
geom_smooth(method=lm, formula = y ~poly(x, 2), se=FALSE) +
facet_grid(. ~ genotype) +
xlab(label = "Olaparib (log10 nM)") +
scale_color_manual(values=c("#000000","#FF0000"))

# NormCounts Cubic
ggplot(dataset, aes(x=Olaparib, y=NormCounts, color=siRNA)) +
theme_bw() +
theme(panel.grid=element_blank(), text = element_text(size=14)) +
geom_point(aes(colour=siRNA), size=2) +
geom_smooth(method=lm, formula = y ~ poly(x, 3), se=FALSE) +
facet_grid(. ~ genotype) +
xlab(label = "Olaparib (log10 nM)")+
scale_color_manual(values=c("#000000","#FF0000"))

# NormCounts2 Cubic
ggplot(dataset, aes(x=Olaparib, y=NormCounts2, color=siRNA)) +
theme_bw() +
theme(panel.grid=element_blank(), text = element_text(size=14)) +
geom_point(aes(colour=siRNA), size=2) +
geom_smooth(method=lm, formula = y ~ poly(x, 3), se=FALSE) +
facet_grid(. ~ genotype) +
xlab(label = "Olaparib (log10 nM)") +
scale_color_manual(values=c("#000000","#FF0000"))

library(Cairo)
cairo_pdf("FigureS1E.pdf", width = 5, height = 4, family = "Arial")
ggplot(dataset, aes(x=Olaparib, y=NormCounts2)) +
theme_bw() +
theme(panel.grid.major=element_blank(), panel.grid.minor=element_blank(),
axis.line = element_line(colour = "black"), text = element_text(size=14),
panel.border = element_blank(), panel.background = element_blank()) +
geom_point(aes(colour = siRNA, shape = genotype), size=1.75) +
geom_smooth(method=lm, formula = y ~ poly(x,3), se=TRUE,
aes(group = GSID,colour = siRNA, linetype = genotype), fill='#DDDDDD', size=0.5) +
#facet_grid(. ~ genotype) +
xlab(label = "Olaparib (log10 nM)") +
ylab(label = "Normalized Counts") +
scale_color_manual(values=c("#000000","#FF0000")) +
guides(linetype = guide_legend(override.aes= list(color = "#555555")))
dev.off()
## quartz_off_screen
## 2
Models
library(MASS)
library(DHARMa)
library(lme4)
library(lmerTest)
library(bbmle)
Linear formula
fit1 <- lm(Counts ~ Experiment + Olaparib*siRNA*genotype, data = dataset)
print(summary(fit1))
##
## Call:
## lm(formula = Counts ~ Experiment + Olaparib * siRNA * genotype,
## data = dataset)
##
## Residuals:
## Min 1Q Median 3Q Max
## -107.230 -24.808 -4.373 23.873 126.007
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 234.2303 24.6661 9.496 1.41e-11 ***
## Experimentexp2 50.6875 15.9414 3.180 0.00293 **
## Experimentexp3 105.2500 15.9414 6.602 8.53e-08 ***
## Olaparib -52.4585 10.1314 -5.178 7.61e-06 ***
## siRNAsiPARP1 -6.6819 32.3638 -0.206 0.83753
## genotypeALC1KO -112.8260 32.3638 -3.486 0.00125 **
## Olaparib:siRNAsiPARP1 10.4594 14.3280 0.730 0.46987
## Olaparib:genotypeALC1KO 0.8931 14.3280 0.062 0.95062
## siRNAsiPARP1:genotypeALC1KO 80.8501 45.7693 1.766 0.08535 .
## Olaparib:siRNAsiPARP1:genotypeALC1KO -6.6476 20.2628 -0.328 0.74466
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 45.09 on 38 degrees of freedom
## Multiple R-squared: 0.8338, Adjusted R-squared: 0.7944
## F-statistic: 21.18 on 9 and 38 DF, p-value: 3.24e-12
cat("AIC: ", AIC(fit1))
## AIC: 512.6341
simres <- simulateResiduals(fittedModel = fit1)
plot(simres)

fit2 <- lm(NormCounts ~ Olaparib*siRNA*genotype, data = dataset)
print(summary(fit2))
##
## Call:
## lm(formula = NormCounts ~ Olaparib * siRNA * genotype, data = dataset)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.4485 -0.1338 -0.0444 0.1440 0.3723
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 1.51901 0.09902 15.340 < 2e-16 ***
## Olaparib -0.27936 0.04384 -6.373 1.42e-07 ***
## siRNAsiPARP1 -0.13321 0.14004 -0.951 0.3472
## genotypeALC1KO 0.70978 0.14004 5.068 9.52e-06 ***
## Olaparib:siRNAsiPARP1 0.07170 0.06200 1.157 0.2543
## Olaparib:genotypeALC1KO -0.38205 0.06200 -6.162 2.79e-07 ***
## siRNAsiPARP1:genotypeALC1KO -0.54819 0.19804 -2.768 0.0085 **
## Olaparib:siRNAsiPARP1:genotypeALC1KO 0.29507 0.08768 3.365 0.0017 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1951 on 40 degrees of freedom
## Multiple R-squared: 0.8936, Adjusted R-squared: 0.8749
## F-statistic: 47.98 on 7 and 40 DF, p-value: < 2.2e-16
cat("AIC: ", AIC(fit2))
## AIC: -11.42023
simres <- simulateResiduals(fittedModel = fit2)
plot(simres)

fit3 <- lm(NormCounts2 ~ Olaparib*siRNA*genotype, data = dataset)
print(summary(fit3))
##
## Call:
## lm(formula = NormCounts2 ~ Olaparib * siRNA * genotype, data = dataset)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.18174 -0.08375 -0.03222 0.08930 0.17202
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 1.10392 0.05572 19.813 < 2e-16 ***
## Olaparib -0.20302 0.02467 -8.231 3.86e-10 ***
## siRNAsiPARP1 -0.05144 0.07880 -0.653 0.5176
## genotypeALC1KO -0.20071 0.07880 -2.547 0.0148 *
## Olaparib:siRNAsiPARP1 0.04531 0.03488 1.299 0.2014
## Olaparib:genotypeALC1KO -0.06501 0.03488 -1.864 0.0697 .
## siRNAsiPARP1:genotypeALC1KO 0.22082 0.11144 1.982 0.0544 .
## Olaparib:siRNAsiPARP1:genotypeALC1KO 0.01849 0.04933 0.375 0.7098
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1098 on 40 degrees of freedom
## Multiple R-squared: 0.9035, Adjusted R-squared: 0.8866
## F-statistic: 53.5 on 7 and 40 DF, p-value: < 2.2e-16
cat("AIC: ", AIC(fit3))
## AIC: -66.62439
simres <- simulateResiduals(fittedModel = fit3)
plot(simres)

fit4 <- lmer(Counts ~ Olaparib*siRNA*genotype + (1|UID), data = dataset)
print(summary(fit4))
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: Counts ~ Olaparib * siRNA * genotype + (1 | UID)
## Data: dataset
##
## REML criterion at convergence: 444
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -1.90616 -0.53229 0.01726 0.51233 2.31632
##
## Random effects:
## Groups Name Variance Std.Dev.
## UID (Intercept) 3446 58.7
## Residual 1391 37.3
## Number of obs: 48, groups: UID, 12
##
## Fixed effects:
## Estimate Std. Error df t value
## (Intercept) 286.2095 38.8194 11.2590 7.373
## Olaparib -52.4585 8.3818 32.0000 -6.259
## siRNAsiPARP1 -6.6819 54.8990 11.2590 -0.122
## genotypeALC1KO -112.8260 54.8990 11.2590 -2.055
## Olaparib:siRNAsiPARP1 10.4594 11.8537 32.0000 0.882
## Olaparib:genotypeALC1KO 0.8931 11.8537 32.0000 0.075
## siRNAsiPARP1:genotypeALC1KO 80.8501 77.6389 11.2590 1.041
## Olaparib:siRNAsiPARP1:genotypeALC1KO -6.6476 16.7637 32.0000 -0.397
## Pr(>|t|)
## (Intercept) 1.23e-05 ***
## Olaparib 5.15e-07 ***
## siRNAsiPARP1 0.9053
## genotypeALC1KO 0.0638 .
## Olaparib:siRNAsiPARP1 0.3842
## Olaparib:genotypeALC1KO 0.9404
## siRNAsiPARP1:genotypeALC1KO 0.3196
## Olaparib:siRNAsiPARP1:genotypeALC1KO 0.6943
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## (Intr) Olaprb sRNAsPARP1 gALC1K Ol:RNAPARP1 O:ALC1 sRNAPARP1:
## Olaparib -0.401
## siRNAsPARP1 -0.707 0.284
## gntypALC1KO -0.707 0.284 0.500
## Ol:RNAPARP1 0.284 -0.707 -0.401 -0.201
## Olpr:ALC1KO 0.284 -0.707 -0.201 -0.401 0.500
## sRNAPARP1:A 0.500 -0.201 -0.707 -0.707 0.284 0.284
## O:RNAPARP1: -0.201 0.500 0.284 0.284 -0.707 -0.707 -0.401
cat("AIC: ", AIC(fit4))
## AIC: 464.0374
simres <- simulateResiduals(fittedModel = fit4)
plot(simres)

Quadratic formula
fit5 <- lm(Counts ~ Experiment + poly(Olaparib,2)*siRNA*genotype, data = dataset)
print(summary(fit5))
##
## Call:
## lm(formula = Counts ~ Experiment + poly(Olaparib, 2) * siRNA *
## genotype, data = dataset)
##
## Residuals:
## Min 1Q Median 3Q Max
## -82.799 -20.793 2.271 18.236 94.158
##
## Coefficients:
## Estimate Std. Error t value
## (Intercept) 136.77 14.44 9.472
## Experimentexp2 50.69 14.44 3.510
## Experimentexp3 105.25 14.44 7.289
## poly(Olaparib, 2)1 -466.93 81.68 -5.717
## poly(Olaparib, 2)2 -186.06 81.68 -2.278
## siRNAsiPARP1 12.75 16.67 0.765
## genotypeALC1KO -111.17 16.67 -6.668
## poly(Olaparib, 2)1:siRNAsiPARP1 93.10 115.51 0.806
## poly(Olaparib, 2)2:siRNAsiPARP1 63.02 115.51 0.546
## poly(Olaparib, 2)1:genotypeALC1KO 7.95 115.51 0.069
## poly(Olaparib, 2)2:genotypeALC1KO 322.38 115.51 2.791
## siRNAsiPARP1:genotypeALC1KO 68.50 23.58 2.905
## poly(Olaparib, 2)1:siRNAsiPARP1:genotypeALC1KO -59.17 163.36 -0.362
## poly(Olaparib, 2)2:siRNAsiPARP1:genotypeALC1KO -317.01 163.36 -1.941
## Pr(>|t|)
## (Intercept) 4.59e-11 ***
## Experimentexp2 0.00128 **
## Experimentexp3 1.93e-08 ***
## poly(Olaparib, 2)1 2.01e-06 ***
## poly(Olaparib, 2)2 0.02914 *
## siRNAsiPARP1 0.44972
## genotypeALC1KO 1.19e-07 ***
## poly(Olaparib, 2)1:siRNAsiPARP1 0.42587
## poly(Olaparib, 2)2:siRNAsiPARP1 0.58895
## poly(Olaparib, 2)1:genotypeALC1KO 0.94553
## poly(Olaparib, 2)2:genotypeALC1KO 0.00856 **
## siRNAsiPARP1:genotypeALC1KO 0.00641 **
## poly(Olaparib, 2)1:siRNAsiPARP1:genotypeALC1KO 0.71944
## poly(Olaparib, 2)2:siRNAsiPARP1:genotypeALC1KO 0.06064 .
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 40.84 on 34 degrees of freedom
## Multiple R-squared: 0.878, Adjusted R-squared: 0.8313
## F-statistic: 18.82 on 13 and 34 DF, p-value: 7.868e-12
cat("AIC: ", AIC(fit5))
## AIC: 505.7933
simres <- simulateResiduals(fittedModel = fit5)
plot(simres)

fit6 <- lm(NormCounts ~ poly(Olaparib,2)*siRNA*genotype, data = dataset)
print(summary(fit6))
##
## Call:
## lm(formula = NormCounts ~ poly(Olaparib, 2) * siRNA * genotype,
## data = dataset)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.154949 -0.038710 0.005231 0.034999 0.154487
##
## Coefficients:
## Estimate Std. Error t value
## (Intercept) 1.000e+00 2.178e-02 45.921
## poly(Olaparib, 2)1 -2.487e+00 1.509e-01 -16.481
## poly(Olaparib, 2)2 -1.025e+00 1.509e-01 -6.791
## siRNAsiPARP1 -2.100e-16 3.080e-02 0.000
## genotypeALC1KO -1.290e-16 3.080e-02 0.000
## poly(Olaparib, 2)1:siRNAsiPARP1 6.382e-01 2.134e-01 2.991
## poly(Olaparib, 2)2:siRNAsiPARP1 3.941e-01 2.134e-01 1.847
## poly(Olaparib, 2)1:genotypeALC1KO -3.401e+00 2.134e-01 -15.938
## poly(Olaparib, 2)2:genotypeALC1KO 2.830e+00 2.134e-01 13.262
## siRNAsiPARP1:genotypeALC1KO -2.950e-17 4.355e-02 0.000
## poly(Olaparib, 2)1:siRNAsiPARP1:genotypeALC1KO 2.626e+00 3.017e-01 8.704
## poly(Olaparib, 2)2:siRNAsiPARP1:genotypeALC1KO -2.951e+00 3.017e-01 -9.779
## Pr(>|t|)
## (Intercept) < 2e-16 ***
## poly(Olaparib, 2)1 < 2e-16 ***
## poly(Olaparib, 2)2 6.18e-08 ***
## siRNAsiPARP1 1.00000
## genotypeALC1KO 1.00000
## poly(Olaparib, 2)1:siRNAsiPARP1 0.00499 **
## poly(Olaparib, 2)2:siRNAsiPARP1 0.07301 .
## poly(Olaparib, 2)1:genotypeALC1KO < 2e-16 ***
## poly(Olaparib, 2)2:genotypeALC1KO 2.01e-15 ***
## siRNAsiPARP1:genotypeALC1KO 1.00000
## poly(Olaparib, 2)1:siRNAsiPARP1:genotypeALC1KO 2.21e-10 ***
## poly(Olaparib, 2)2:siRNAsiPARP1:genotypeALC1KO 1.13e-11 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.07544 on 36 degrees of freedom
## Multiple R-squared: 0.9857, Adjusted R-squared: 0.9813
## F-statistic: 225.3 on 11 and 36 DF, p-value: < 2.2e-16
cat("AIC: ", AIC(fit6))
## AIC: -99.69902
simres <- simulateResiduals(fittedModel = fit6)
plot(simres)

fit7 <- lm(NormCounts2 ~ poly(Olaparib,2)*siRNA*genotype, data = dataset)
print(summary(fit7))
##
## Call:
## lm(formula = NormCounts2 ~ poly(Olaparib, 2) * siRNA * genotype,
## data = dataset)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.10741 -0.02228 0.00343 0.02370 0.11733
##
## Coefficients:
## Estimate Std. Error t value
## (Intercept) 0.72674 0.01398 51.966
## poly(Olaparib, 2)1 -1.80709 0.09689 -18.651
## poly(Olaparib, 2)2 -0.74460 0.09689 -7.685
## siRNAsiPARP1 0.03274 0.01978 1.655
## genotypeALC1KO -0.32149 0.01978 -16.255
## poly(Olaparib, 2)1:siRNAsiPARP1 0.40330 0.13702 2.943
## poly(Olaparib, 2)2:siRNAsiPARP1 0.26573 0.13702 1.939
## poly(Olaparib, 2)1:genotypeALC1KO -0.57866 0.13702 -4.223
## poly(Olaparib, 2)2:genotypeALC1KO 1.47615 0.13702 10.773
## siRNAsiPARP1:genotypeALC1KO 0.25518 0.02797 9.123
## poly(Olaparib, 2)1:siRNAsiPARP1:genotypeALC1KO 0.16459 0.19378 0.849
## poly(Olaparib, 2)2:siRNAsiPARP1:genotypeALC1KO -1.51820 0.19378 -7.835
## Pr(>|t|)
## (Intercept) < 2e-16 ***
## poly(Olaparib, 2)1 < 2e-16 ***
## poly(Olaparib, 2)2 4.24e-09 ***
## siRNAsiPARP1 0.106589
## genotypeALC1KO < 2e-16 ***
## poly(Olaparib, 2)1:siRNAsiPARP1 0.005654 **
## poly(Olaparib, 2)2:siRNAsiPARP1 0.060334 .
## poly(Olaparib, 2)1:genotypeALC1KO 0.000156 ***
## poly(Olaparib, 2)2:genotypeALC1KO 8.19e-13 ***
## siRNAsiPARP1:genotypeALC1KO 6.80e-11 ***
## poly(Olaparib, 2)1:siRNAsiPARP1:genotypeALC1KO 0.401300
## poly(Olaparib, 2)2:siRNAsiPARP1:genotypeALC1KO 2.73e-09 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.04845 on 36 degrees of freedom
## Multiple R-squared: 0.9831, Adjusted R-squared: 0.9779
## F-statistic: 190.2 on 11 and 36 DF, p-value: < 2.2e-16
cat("AIC: ", AIC(fit7))
## AIC: -142.2131
simres <- simulateResiduals(fittedModel = fit7)
plot(simres)

fit8 <- lmer(Counts ~ poly(Olaparib,2)*siRNA*genotype + (1|UID), data = dataset)
print(summary(fit8))
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: Counts ~ poly(Olaparib, 2) * siRNA * genotype + (1 | UID)
## Data: dataset
##
## REML criterion at convergence: 367.1
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -1.52447 -0.58141 -0.02631 0.42330 1.74095
##
## Random effects:
## Groups Name Variance Std.Dev.
## UID (Intercept) 3579.2 59.83
## Residual 856.5 29.27
## Number of obs: 48, groups: UID, 12
##
## Fixed effects:
## Estimate Std. Error df
## (Intercept) 188.75 35.56 8.00
## poly(Olaparib, 2)1 -466.93 58.53 28.00
## poly(Olaparib, 2)2 -186.06 58.53 28.00
## siRNAsiPARP1 12.75 50.29 8.00
## genotypeALC1KO -111.17 50.29 8.00
## poly(Olaparib, 2)1:siRNAsiPARP1 93.10 82.78 28.00
## poly(Olaparib, 2)2:siRNAsiPARP1 63.02 82.78 28.00
## poly(Olaparib, 2)1:genotypeALC1KO 7.95 82.78 28.00
## poly(Olaparib, 2)2:genotypeALC1KO 322.38 82.78 28.00
## siRNAsiPARP1:genotypeALC1KO 68.50 71.12 8.00
## poly(Olaparib, 2)1:siRNAsiPARP1:genotypeALC1KO -59.17 117.06 28.00
## poly(Olaparib, 2)2:siRNAsiPARP1:genotypeALC1KO -317.01 117.06 28.00
## t value Pr(>|t|)
## (Intercept) 5.308 0.000721 ***
## poly(Olaparib, 2)1 -7.977 1.09e-08 ***
## poly(Olaparib, 2)2 -3.179 0.003593 **
## siRNAsiPARP1 0.254 0.806247
## genotypeALC1KO -2.211 0.058028 .
## poly(Olaparib, 2)1:siRNAsiPARP1 1.125 0.270268
## poly(Olaparib, 2)2:siRNAsiPARP1 0.761 0.452854
## poly(Olaparib, 2)1:genotypeALC1KO 0.096 0.924173
## poly(Olaparib, 2)2:genotypeALC1KO 3.895 0.000557 ***
## siRNAsiPARP1:genotypeALC1KO 0.963 0.363663
## poly(Olaparib, 2)1:siRNAsiPARP1:genotypeALC1KO -0.505 0.617201
## poly(Olaparib, 2)2:siRNAsiPARP1:genotypeALC1KO -2.708 0.011410 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## (Intr) pl(O,2)1 pl(O,2)2 sRNAsPARP1 gALC1K pl(O,2)1:RNAPARP1
## ply(Olp,2)1 0.000
## ply(Olp,2)2 0.000 0.000
## siRNAsPARP1 -0.707 0.000 0.000
## gntypALC1KO -0.707 0.000 0.000 0.500
## pl(O,2)1:RNAPARP1 0.000 -0.707 0.000 0.000 0.000
## pl(O,2)2:RNAPARP1 0.000 0.000 -0.707 0.000 0.000 0.000
## p(O,2)1:ALC 0.000 -0.707 0.000 0.000 0.000 0.500
## p(O,2)2:ALC 0.000 0.000 -0.707 0.000 0.000 0.000
## sRNAPARP1:A 0.500 0.000 0.000 -0.707 -0.707 0.000
## p(O,2)1:RNAPARP1: 0.000 0.500 0.000 0.000 0.000 -0.707
## p(O,2)2:RNAPARP1: 0.000 0.000 0.500 0.000 0.000 0.000
## pl(O,2)2:RNAPARP1 p(O,2)1:A p(O,2)2:A sRNAPARP1:
## ply(Olp,2)1
## ply(Olp,2)2
## siRNAsPARP1
## gntypALC1KO
## pl(O,2)1:RNAPARP1
## pl(O,2)2:RNAPARP1
## p(O,2)1:ALC 0.000
## p(O,2)2:ALC 0.500 0.000
## sRNAPARP1:A 0.000 0.000 0.000
## p(O,2)1:RNAPARP1: 0.000 -0.707 0.000 0.000
## p(O,2)2:RNAPARP1: -0.707 0.000 -0.707 0.000
## p(O,2)1:RNAPARP1:
## ply(Olp,2)1
## ply(Olp,2)2
## siRNAsPARP1
## gntypALC1KO
## pl(O,2)1:RNAPARP1
## pl(O,2)2:RNAPARP1
## p(O,2)1:ALC
## p(O,2)2:ALC
## sRNAPARP1:A
## p(O,2)1:RNAPARP1:
## p(O,2)2:RNAPARP1: 0.000
cat("AIC: ", AIC(fit8))
## AIC: 395.1106
simres <- simulateResiduals(fittedModel = fit8)
plot(simres)

Cubic formula
fit9 <- lm(Counts ~ Experiment + poly(Olaparib,3)*siRNA*genotype, data = dataset)
print(summary(fit9))
##
## Call:
## lm(formula = Counts ~ Experiment + poly(Olaparib, 3) * siRNA *
## genotype, data = dataset)
##
## Residuals:
## Min 1Q Median 3Q Max
## -80.687 -12.203 -2.542 15.125 89.062
##
## Coefficients:
## Estimate Std. Error t value
## (Intercept) 136.77 15.13 9.038
## Experimentexp2 50.69 15.13 3.349
## Experimentexp3 105.25 15.13 6.955
## poly(Olaparib, 3)1 -466.93 85.61 -5.454
## poly(Olaparib, 3)2 -186.06 85.61 -2.173
## poly(Olaparib, 3)3 51.35 85.61 0.600
## siRNAsiPARP1 12.75 17.48 0.730
## genotypeALC1KO -111.17 17.48 -6.362
## poly(Olaparib, 3)1:siRNAsiPARP1 93.10 121.07 0.769
## poly(Olaparib, 3)2:siRNAsiPARP1 63.02 121.07 0.520
## poly(Olaparib, 3)3:siRNAsiPARP1 -107.17 121.07 -0.885
## poly(Olaparib, 3)1:genotypeALC1KO 7.95 121.07 0.066
## poly(Olaparib, 3)2:genotypeALC1KO 322.38 121.07 2.663
## poly(Olaparib, 3)3:genotypeALC1KO -52.55 121.07 -0.434
## siRNAsiPARP1:genotypeALC1KO 68.50 24.71 2.772
## poly(Olaparib, 3)1:siRNAsiPARP1:genotypeALC1KO -59.17 171.22 -0.346
## poly(Olaparib, 3)2:siRNAsiPARP1:genotypeALC1KO -317.01 171.22 -1.851
## poly(Olaparib, 3)3:siRNAsiPARP1:genotypeALC1KO 143.25 171.22 0.837
## Pr(>|t|)
## (Intercept) 4.57e-10 ***
## Experimentexp2 0.00220 **
## Experimentexp3 1.00e-07 ***
## poly(Olaparib, 3)1 6.46e-06 ***
## poly(Olaparib, 3)2 0.03778 *
## poly(Olaparib, 3)3 0.55309
## siRNAsiPARP1 0.47128
## genotypeALC1KO 5.10e-07 ***
## poly(Olaparib, 3)1:siRNAsiPARP1 0.44793
## poly(Olaparib, 3)2:siRNAsiPARP1 0.60654
## poly(Olaparib, 3)3:siRNAsiPARP1 0.38309
## poly(Olaparib, 3)1:genotypeALC1KO 0.94808
## poly(Olaparib, 3)2:genotypeALC1KO 0.01234 *
## poly(Olaparib, 3)3:genotypeALC1KO 0.66733
## siRNAsiPARP1:genotypeALC1KO 0.00948 **
## poly(Olaparib, 3)1:siRNAsiPARP1:genotypeALC1KO 0.73207
## poly(Olaparib, 3)2:siRNAsiPARP1:genotypeALC1KO 0.07397 .
## poly(Olaparib, 3)3:siRNAsiPARP1:genotypeALC1KO 0.40941
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 42.8 on 30 degrees of freedom
## Multiple R-squared: 0.8817, Adjusted R-squared: 0.8147
## F-statistic: 13.16 on 17 and 30 DF, p-value: 1.501e-09
cat("AIC: ", AIC(fit9))
## AIC: 512.2951
simres <- simulateResiduals(fittedModel = fit9)
plot(simres)

fit10 <- lm(NormCounts ~ poly(Olaparib,3)*siRNA*genotype, data = dataset)
print(summary(fit10))
##
## Call:
## lm(formula = NormCounts ~ poly(Olaparib, 3) * siRNA * genotype,
## data = dataset)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.131742 -0.029948 0.002213 0.028289 0.141793
##
## Coefficients:
## Estimate Std. Error t value
## (Intercept) 1.000e+00 2.045e-02 48.888
## poly(Olaparib, 3)1 -2.487e+00 1.417e-01 -17.546
## poly(Olaparib, 3)2 -1.025e+00 1.417e-01 -7.230
## poly(Olaparib, 3)3 2.058e-01 1.417e-01 1.452
## siRNAsiPARP1 -1.743e-16 2.893e-02 0.000
## genotypeALC1KO -1.705e-16 2.893e-02 0.000
## poly(Olaparib, 3)1:siRNAsiPARP1 6.382e-01 2.004e-01 3.184
## poly(Olaparib, 3)2:siRNAsiPARP1 3.941e-01 2.004e-01 1.966
## poly(Olaparib, 3)3:siRNAsiPARP1 -5.388e-01 2.004e-01 -2.688
## poly(Olaparib, 3)1:genotypeALC1KO -3.401e+00 2.004e-01 -16.967
## poly(Olaparib, 3)2:genotypeALC1KO 2.830e+00 2.004e-01 14.119
## poly(Olaparib, 3)3:genotypeALC1KO -2.493e-01 2.004e-01 -1.244
## siRNAsiPARP1:genotypeALC1KO -4.743e-17 4.091e-02 0.000
## poly(Olaparib, 3)1:siRNAsiPARP1:genotypeALC1KO 2.626e+00 2.834e-01 9.266
## poly(Olaparib, 3)2:siRNAsiPARP1:genotypeALC1KO -2.951e+00 2.834e-01 -10.411
## poly(Olaparib, 3)3:siRNAsiPARP1:genotypeALC1KO 7.294e-01 2.834e-01 2.574
## Pr(>|t|)
## (Intercept) < 2e-16 ***
## poly(Olaparib, 3)1 < 2e-16 ***
## poly(Olaparib, 3)2 3.26e-08 ***
## poly(Olaparib, 3)3 0.15621
## siRNAsiPARP1 1.00000
## genotypeALC1KO 1.00000
## poly(Olaparib, 3)1:siRNAsiPARP1 0.00323 **
## poly(Olaparib, 3)2:siRNAsiPARP1 0.05801 .
## poly(Olaparib, 3)3:siRNAsiPARP1 0.01130 *
## poly(Olaparib, 3)1:genotypeALC1KO < 2e-16 ***
## poly(Olaparib, 3)2:genotypeALC1KO 2.69e-15 ***
## poly(Olaparib, 3)3:genotypeALC1KO 0.22257
## siRNAsiPARP1:genotypeALC1KO 1.00000
## poly(Olaparib, 3)1:siRNAsiPARP1:genotypeALC1KO 1.41e-10 ***
## poly(Olaparib, 3)2:siRNAsiPARP1:genotypeALC1KO 8.39e-12 ***
## poly(Olaparib, 3)3:siRNAsiPARP1:genotypeALC1KO 0.01490 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.07086 on 32 degrees of freedom
## Multiple R-squared: 0.9888, Adjusted R-squared: 0.9835
## F-statistic: 187.8 on 15 and 32 DF, p-value: < 2.2e-16
cat("AIC: ", AIC(fit10))
## AIC: -103.3635
simres <- simulateResiduals(fittedModel = fit10)
plot(simres)

fit11 <- lm(NormCounts2 ~ poly(Olaparib,3)*siRNA*genotype, data = dataset)
print(summary(fit11))
##
## Call:
## lm(formula = NormCounts2 ~ poly(Olaparib, 3) * siRNA * genotype,
## data = dataset)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.085863 -0.019458 0.001602 0.013273 0.098286
##
## Coefficients:
## Estimate Std. Error t value
## (Intercept) 0.72674 0.01252 58.028
## poly(Olaparib, 3)1 -1.80709 0.08677 -20.827
## poly(Olaparib, 3)2 -0.74460 0.08677 -8.582
## poly(Olaparib, 3)3 0.14955 0.08677 1.724
## siRNAsiPARP1 0.03274 0.01771 1.848
## genotypeALC1KO -0.32149 0.01771 -18.151
## poly(Olaparib, 3)1:siRNAsiPARP1 0.40330 0.12271 3.287
## poly(Olaparib, 3)2:siRNAsiPARP1 0.26573 0.12271 2.166
## poly(Olaparib, 3)3:siRNAsiPARP1 -0.40247 0.12271 -3.280
## poly(Olaparib, 3)1:genotypeALC1KO -0.57866 0.12271 -4.716
## poly(Olaparib, 3)2:genotypeALC1KO 1.47615 0.12271 12.030
## poly(Olaparib, 3)3:genotypeALC1KO -0.16718 0.12271 -1.362
## siRNAsiPARP1:genotypeALC1KO 0.25518 0.02505 10.188
## poly(Olaparib, 3)1:siRNAsiPARP1:genotypeALC1KO 0.16459 0.17354 0.948
## poly(Olaparib, 3)2:siRNAsiPARP1:genotypeALC1KO -1.51820 0.17354 -8.749
## poly(Olaparib, 3)3:siRNAsiPARP1:genotypeALC1KO 0.52209 0.17354 3.009
## Pr(>|t|)
## (Intercept) < 2e-16 ***
## poly(Olaparib, 3)1 < 2e-16 ***
## poly(Olaparib, 3)2 8.32e-10 ***
## poly(Olaparib, 3)3 0.09444 .
## siRNAsiPARP1 0.07383 .
## genotypeALC1KO < 2e-16 ***
## poly(Olaparib, 3)1:siRNAsiPARP1 0.00246 **
## poly(Olaparib, 3)2:siRNAsiPARP1 0.03791 *
## poly(Olaparib, 3)3:siRNAsiPARP1 0.00251 **
## poly(Olaparib, 3)1:genotypeALC1KO 4.53e-05 ***
## poly(Olaparib, 3)2:genotypeALC1KO 2.05e-13 ***
## poly(Olaparib, 3)3:genotypeALC1KO 0.18257
## siRNAsiPARP1:genotypeALC1KO 1.44e-11 ***
## poly(Olaparib, 3)1:siRNAsiPARP1:genotypeALC1KO 0.35001
## poly(Olaparib, 3)2:siRNAsiPARP1:genotypeALC1KO 5.37e-10 ***
## poly(Olaparib, 3)3:siRNAsiPARP1:genotypeALC1KO 0.00508 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.04338 on 32 degrees of freedom
## Multiple R-squared: 0.9879, Adjusted R-squared: 0.9823
## F-statistic: 174.8 on 15 and 32 DF, p-value: < 2.2e-16
cat("AIC: ", AIC(fit11))
## AIC: -150.4599
simres <- simulateResiduals(fittedModel = fit11)
plot(simres)

fit12 <- lmer(Counts ~ poly(Olaparib,3)*siRNA*genotype + (1|UID), data = dataset)
print(summary(fit12))
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: Counts ~ poly(Olaparib, 3) * siRNA * genotype + (1 | UID)
## Data: dataset
##
## REML criterion at convergence: 325.1
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -1.57704 -0.47088 -0.06373 0.41746 1.52191
##
## Random effects:
## Groups Name Variance Std.Dev.
## UID (Intercept) 3561.7 59.68
## Residual 926.6 30.44
## Number of obs: 48, groups: UID, 12
##
## Fixed effects:
## Estimate Std. Error df
## (Intercept) 188.75 35.56 8.00
## poly(Olaparib, 3)1 -466.93 60.88 24.00
## poly(Olaparib, 3)2 -186.06 60.88 24.00
## poly(Olaparib, 3)3 51.35 60.88 24.00
## siRNAsiPARP1 12.75 50.29 8.00
## genotypeALC1KO -111.17 50.29 8.00
## poly(Olaparib, 3)1:siRNAsiPARP1 93.10 86.10 24.00
## poly(Olaparib, 3)2:siRNAsiPARP1 63.02 86.10 24.00
## poly(Olaparib, 3)3:siRNAsiPARP1 -107.17 86.10 24.00
## poly(Olaparib, 3)1:genotypeALC1KO 7.95 86.10 24.00
## poly(Olaparib, 3)2:genotypeALC1KO 322.38 86.10 24.00
## poly(Olaparib, 3)3:genotypeALC1KO -52.55 86.10 24.00
## siRNAsiPARP1:genotypeALC1KO 68.50 71.12 8.00
## poly(Olaparib, 3)1:siRNAsiPARP1:genotypeALC1KO -59.17 121.76 24.00
## poly(Olaparib, 3)2:siRNAsiPARP1:genotypeALC1KO -317.01 121.76 24.00
## poly(Olaparib, 3)3:siRNAsiPARP1:genotypeALC1KO 143.25 121.76 24.00
## t value Pr(>|t|)
## (Intercept) 5.308 0.000721 ***
## poly(Olaparib, 3)1 -7.669 6.6e-08 ***
## poly(Olaparib, 3)2 -3.056 0.005430 **
## poly(Olaparib, 3)3 0.844 0.407262
## siRNAsiPARP1 0.254 0.806247
## genotypeALC1KO -2.211 0.058028 .
## poly(Olaparib, 3)1:siRNAsiPARP1 1.081 0.290314
## poly(Olaparib, 3)2:siRNAsiPARP1 0.732 0.471316
## poly(Olaparib, 3)3:siRNAsiPARP1 -1.245 0.225243
## poly(Olaparib, 3)1:genotypeALC1KO 0.092 0.927200
## poly(Olaparib, 3)2:genotypeALC1KO 3.744 0.001003 **
## poly(Olaparib, 3)3:genotypeALC1KO -0.610 0.547332
## siRNAsiPARP1:genotypeALC1KO 0.963 0.363663
## poly(Olaparib, 3)1:siRNAsiPARP1:genotypeALC1KO -0.486 0.631416
## poly(Olaparib, 3)2:siRNAsiPARP1:genotypeALC1KO -2.603 0.015581 *
## poly(Olaparib, 3)3:siRNAsiPARP1:genotypeALC1KO 1.176 0.250951
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
cat("AIC: ", AIC(fit12))
## AIC: 361.0916
simres <- simulateResiduals(fittedModel = fit12)
plot(simres)

Final Result
fit <- fit11
output <- coef(summary(fit))
output <- output[grep("Olaparib", rownames(output)),]
rownames(output) <- gsub("poly\\(|, [1-3]\\)","", rownames(output) )
rownames(output) <- gsub("genotype", paste0(" ",levels(dataset$genotype)[1], " vs. "), rownames(output))
rownames(output)[!(grepl("vs", rownames(output)))] <- paste(rownames(output)[!(grepl("vs", rownames(output)))], levels(dataset$genotype)[1], sep = " in " )
rownames(output) <- gsub("siRNA", paste0(" ",levels(dataset$siRNA)[1], " vs. "), rownames(output))
rownames(output)[!(grepl("vs.*vs| in ", rownames(output)))] <- paste(rownames(output)[!(grepl("vs.*vs| in ", rownames(output)))], levels(dataset$siRNA)[1], sep = " in " )
rownames(output)[!(grepl("vs", rownames(output)))] <- paste(rownames(output)[!(grepl("vs", rownames(output)))], levels(dataset$siRNA)[1], sep = " " )
# suggested result table
kable(output, row.names = T)
| Olaparib1 in WT siCtrl |
-1.8070860 |
0.0867681 |
-20.8266249 |
0.0000000 |
| Olaparib2 in WT siCtrl |
-0.7446048 |
0.0867681 |
-8.5815537 |
0.0000000 |
| Olaparib3 in WT siCtrl |
0.1495508 |
0.0867681 |
1.7235695 |
0.0944365 |
| Olaparib1: siCtrl vs. siPARP1 in WT |
0.4032997 |
0.1227086 |
3.2866463 |
0.0024649 |
| Olaparib2: siCtrl vs. siPARP1 in WT |
0.2657308 |
0.1227086 |
2.1655438 |
0.0379076 |
| Olaparib3: siCtrl vs. siPARP1 in WT |
-0.4024657 |
0.1227086 |
-3.2798500 |
0.0025096 |
| Olaparib1: WT vs. ALC1KO in siCtrl |
-0.5786582 |
0.1227086 |
-4.7157109 |
0.0000453 |
| Olaparib2: WT vs. ALC1KO in siCtrl |
1.4761548 |
0.1227086 |
12.0297605 |
0.0000000 |
| Olaparib3: WT vs. ALC1KO in siCtrl |
-0.1671846 |
0.1227086 |
-1.3624523 |
0.1825682 |
| Olaparib1: siCtrl vs. siPARP1: WT vs. ALC1KO |
0.1645883 |
0.1735361 |
0.9484384 |
0.3500144 |
| Olaparib2: siCtrl vs. siPARP1: WT vs. ALC1KO |
-1.5182037 |
0.1735361 |
-8.7486312 |
0.0000000 |
| Olaparib3: siCtrl vs. siPARP1: WT vs. ALC1KO |
0.5220878 |
0.1735361 |
3.0085252 |
0.0050828 |
write.table(output, file = "FigureS1E_Stats_Ref_WT.txt", quote = F, sep = "\t", row.names = T, col.names = NA)
# re-fit with ALC1KO reference
dataset$genotype <- relevel(dataset$genotype, ref = "ALC1KO")
fit <- lm(NormCounts2 ~ poly(Olaparib,3)*siRNA*genotype, data = dataset)
output <- coef(summary(fit))
output <- output[grep("Olaparib", rownames(output)),]
rownames(output) <- gsub("poly\\(|, [1-3]\\)","", rownames(output) )
rownames(output) <- gsub("genotype", paste0(" ",levels(dataset$genotype)[1], " vs. "), rownames(output))
rownames(output)[!(grepl("vs", rownames(output)))] <- paste(rownames(output)[!(grepl("vs", rownames(output)))], levels(dataset$genotype)[1], sep = " in " )
rownames(output) <- gsub("siRNA", paste0(" ",levels(dataset$siRNA)[1], " vs. "), rownames(output))
rownames(output)[!(grepl("vs.*vs| in ", rownames(output)))] <- paste(rownames(output)[!(grepl("vs.*vs| in ", rownames(output)))], levels(dataset$siRNA)[1], sep = " in " )
rownames(output)[!(grepl("vs", rownames(output)))] <- paste(rownames(output)[!(grepl("vs", rownames(output)))], levels(dataset$siRNA)[1], sep = " " )
# suggested result table
kable(output, row.names = T)
| Olaparib1 in ALC1KO siCtrl |
-2.3857442 |
0.0867681 |
-27.4956473 |
0.0000000 |
| Olaparib2 in ALC1KO siCtrl |
0.7315500 |
0.0867681 |
8.4310967 |
0.0000000 |
| Olaparib3 in ALC1KO siCtrl |
-0.0176338 |
0.0867681 |
-0.2032291 |
0.8402428 |
| Olaparib1: siCtrl vs. siPARP1 in ALC1KO |
0.5678880 |
0.1227086 |
4.6279408 |
0.0000584 |
| Olaparib2: siCtrl vs. siPARP1 in ALC1KO |
-1.2524729 |
0.1227086 |
-10.2068890 |
0.0000000 |
| Olaparib3: siCtrl vs. siPARP1 in ALC1KO |
0.1196221 |
0.1227086 |
0.9748471 |
0.3369483 |
| Olaparib1: ALC1KO vs. WT in siCtrl |
0.5786582 |
0.1227086 |
4.7157109 |
0.0000453 |
| Olaparib2: ALC1KO vs. WT in siCtrl |
-1.4761548 |
0.1227086 |
-12.0297605 |
0.0000000 |
| Olaparib3: ALC1KO vs. WT in siCtrl |
0.1671846 |
0.1227086 |
1.3624523 |
0.1825682 |
| Olaparib1: siCtrl vs. siPARP1: ALC1KO vs. WT |
-0.1645883 |
0.1735361 |
-0.9484384 |
0.3500144 |
| Olaparib2: siCtrl vs. siPARP1: ALC1KO vs. WT |
1.5182037 |
0.1735361 |
8.7486312 |
0.0000000 |
| Olaparib3: siCtrl vs. siPARP1: ALC1KO vs. WT |
-0.5220878 |
0.1735361 |
-3.0085252 |
0.0050828 |
write.table(output, file = "FigureS1E_Stats_Ref_ALC1.txt", quote = F, sep = "\t", row.names = T, col.names = NA)
Anova
fit11a <- lm(NormCounts2 ~ poly(Olaparib,3)*siRNA*genotype, data = dataset)
fit11b <- lm(NormCounts2 ~ poly(Olaparib,3)*siRNA+genotype, data = dataset)
# anova table
anova(fit11a, fit11b)
## Analysis of Variance Table
##
## Model 1: NormCounts2 ~ poly(Olaparib, 3) * siRNA * genotype
## Model 2: NormCounts2 ~ poly(Olaparib, 3) * siRNA + genotype
## Res.Df RSS Df Sum of Sq F Pr(>F)
## 1 32 0.06023
## 2 39 0.61070 -7 -0.55047 41.781 2.504e-14 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
fit11c <- lm(NormCounts2 ~ poly(Olaparib,3)*genotype*siRNA, data = dataset)
fit11d <- lm(NormCounts2 ~ poly(Olaparib,3)*genotype+siRNA, data = dataset)
# anova table
anova(fit11c, fit11d)
## Analysis of Variance Table
##
## Model 1: NormCounts2 ~ poly(Olaparib, 3) * genotype * siRNA
## Model 2: NormCounts2 ~ poly(Olaparib, 3) * genotype + siRNA
## Res.Df RSS Df Sum of Sq F Pr(>F)
## 1 32 0.06023
## 2 39 0.54317 -7 -0.48294 36.655 1.581e-13 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
New analysis
- fit model for groups (genotype+siRNA)
dataset$GSID <- factor(dataset$GSID, levels = unique(dataset$GSID))
GSID_levels <- levels(dataset$GSID)
for(g in seq_along(GSID_levels)){
cat("Group: ", GSID_levels[g], "\n")
dataset$GSID <- factor(dataset$GSID, levels = unique(dataset$GSID))
dataset$GSID <- relevel(dataset$GSID, ref = GSID_levels[g])
fit_group <- lm(NormCounts2 ~ poly(Olaparib,3)*GSID, data = dataset)
print(summary(fit_group))
cat("AIC: ", AIC(fit_group))
simres <- simulateResiduals(fittedModel = fit_group)
plot(simres)
if(g == 1){
output <- coef(summary(fit_group))
output <- output[grep("Olaparib", rownames(output)),]
rownames(output) <- gsub("poly\\(|, [1-3]\\)","", rownames(output))
rownames(output) <- gsub("GSID", paste0(" ",GSID_levels[g], " vs. "), rownames(output))
rownames(output)[!(grepl("vs", rownames(output)))] <- paste(rownames(output)[!(grepl("vs", rownames(output)))], levels(dataset$GSID)[1], sep = " in " )
} else {
outtmp <- coef(summary(fit_group))
outtmp <- outtmp[grep("Olaparib", rownames(outtmp)),]
rownames(outtmp) <- gsub("poly\\(|, [1-3]\\)","", rownames(outtmp))
rownames(outtmp) <- gsub("GSID", paste0(" ",GSID_levels[g], " vs. "), rownames(outtmp))
rownames(outtmp)[!(grepl("vs", rownames(outtmp)))] <- paste(rownames(outtmp)[!(grepl("vs", rownames(outtmp)))], levels(dataset$GSID)[1], sep = " in " )
output <- rbind(output,outtmp)
}
if(g < length(GSID_levels)){
output <- rbind(output, " ", colnames(output))
}
}
## Group: WT siCtrl
##
## Call:
## lm(formula = NormCounts2 ~ poly(Olaparib, 3) * GSID, data = dataset)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.085863 -0.019458 0.001602 0.013273 0.098286
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.72674 0.01252 58.028 < 2e-16 ***
## poly(Olaparib, 3)1 -1.80709 0.08677 -20.827 < 2e-16 ***
## poly(Olaparib, 3)2 -0.74460 0.08677 -8.582 8.32e-10 ***
## poly(Olaparib, 3)3 0.14955 0.08677 1.724 0.09444 .
## GSIDWT siPARP1 0.03274 0.01771 1.848 0.07383 .
## GSIDALC1KO siCtrl -0.32149 0.01771 -18.151 < 2e-16 ***
## GSIDALC1KO siPARP1 -0.03358 0.01771 -1.896 0.06706 .
## poly(Olaparib, 3)1:GSIDWT siPARP1 0.40330 0.12271 3.287 0.00246 **
## poly(Olaparib, 3)2:GSIDWT siPARP1 0.26573 0.12271 2.166 0.03791 *
## poly(Olaparib, 3)3:GSIDWT siPARP1 -0.40247 0.12271 -3.280 0.00251 **
## poly(Olaparib, 3)1:GSIDALC1KO siCtrl -0.57866 0.12271 -4.716 4.53e-05 ***
## poly(Olaparib, 3)2:GSIDALC1KO siCtrl 1.47615 0.12271 12.030 2.05e-13 ***
## poly(Olaparib, 3)3:GSIDALC1KO siCtrl -0.16718 0.12271 -1.362 0.18257
## poly(Olaparib, 3)1:GSIDALC1KO siPARP1 -0.01077 0.12271 -0.088 0.93061
## poly(Olaparib, 3)2:GSIDALC1KO siPARP1 0.22368 0.12271 1.823 0.07768 .
## poly(Olaparib, 3)3:GSIDALC1KO siPARP1 -0.04756 0.12271 -0.388 0.70087
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.04338 on 32 degrees of freedom
## Multiple R-squared: 0.9879, Adjusted R-squared: 0.9823
## F-statistic: 174.8 on 15 and 32 DF, p-value: < 2.2e-16
##
## AIC: -150.4599

## Group: WT siPARP1
##
## Call:
## lm(formula = NormCounts2 ~ poly(Olaparib, 3) * GSID, data = dataset)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.085863 -0.019458 0.001602 0.013273 0.098286
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.75947 0.01252 60.642 < 2e-16 ***
## poly(Olaparib, 3)1 -1.40379 0.08677 -16.179 < 2e-16 ***
## poly(Olaparib, 3)2 -0.47887 0.08677 -5.519 4.39e-06 ***
## poly(Olaparib, 3)3 -0.25291 0.08677 -2.915 0.006448 **
## GSIDWT siCtrl -0.03274 0.01771 -1.848 0.073827 .
## GSIDALC1KO siCtrl -0.35422 0.01771 -20.000 < 2e-16 ***
## GSIDALC1KO siPARP1 -0.06631 0.01771 -3.744 0.000715 ***
## poly(Olaparib, 3)1:GSIDWT siCtrl -0.40330 0.12271 -3.287 0.002465 **
## poly(Olaparib, 3)2:GSIDWT siCtrl -0.26573 0.12271 -2.166 0.037908 *
## poly(Olaparib, 3)3:GSIDWT siCtrl 0.40247 0.12271 3.280 0.002510 **
## poly(Olaparib, 3)1:GSIDALC1KO siCtrl -0.98196 0.12271 -8.002 3.90e-09 ***
## poly(Olaparib, 3)2:GSIDALC1KO siCtrl 1.21042 0.12271 9.864 3.16e-11 ***
## poly(Olaparib, 3)3:GSIDALC1KO siCtrl 0.23528 0.12271 1.917 0.064151 .
## poly(Olaparib, 3)1:GSIDALC1KO siPARP1 -0.41407 0.12271 -3.374 0.001952 **
## poly(Olaparib, 3)2:GSIDALC1KO siPARP1 -0.04205 0.12271 -0.343 0.734086
## poly(Olaparib, 3)3:GSIDALC1KO siPARP1 0.35490 0.12271 2.892 0.006825 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.04338 on 32 degrees of freedom
## Multiple R-squared: 0.9879, Adjusted R-squared: 0.9823
## F-statistic: 174.8 on 15 and 32 DF, p-value: < 2.2e-16
##
## AIC: -150.4599

## Group: ALC1KO siCtrl
##
## Call:
## lm(formula = NormCounts2 ~ poly(Olaparib, 3) * GSID, data = dataset)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.085863 -0.019458 0.001602 0.013273 0.098286
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.40525 0.01252 32.358 < 2e-16 ***
## poly(Olaparib, 3)1 -2.38574 0.08677 -27.496 < 2e-16 ***
## poly(Olaparib, 3)2 0.73155 0.08677 8.431 1.24e-09 ***
## poly(Olaparib, 3)3 -0.01763 0.08677 -0.203 0.8402
## GSIDWT siCtrl 0.32149 0.01771 18.151 < 2e-16 ***
## GSIDWT siPARP1 0.35422 0.01771 20.000 < 2e-16 ***
## GSIDALC1KO siPARP1 0.28791 0.01771 16.256 < 2e-16 ***
## poly(Olaparib, 3)1:GSIDWT siCtrl 0.57866 0.12271 4.716 4.53e-05 ***
## poly(Olaparib, 3)2:GSIDWT siCtrl -1.47615 0.12271 -12.030 2.05e-13 ***
## poly(Olaparib, 3)3:GSIDWT siCtrl 0.16718 0.12271 1.362 0.1826
## poly(Olaparib, 3)1:GSIDWT siPARP1 0.98196 0.12271 8.002 3.90e-09 ***
## poly(Olaparib, 3)2:GSIDWT siPARP1 -1.21042 0.12271 -9.864 3.16e-11 ***
## poly(Olaparib, 3)3:GSIDWT siPARP1 -0.23528 0.12271 -1.917 0.0642 .
## poly(Olaparib, 3)1:GSIDALC1KO siPARP1 0.56789 0.12271 4.628 5.84e-05 ***
## poly(Olaparib, 3)2:GSIDALC1KO siPARP1 -1.25247 0.12271 -10.207 1.37e-11 ***
## poly(Olaparib, 3)3:GSIDALC1KO siPARP1 0.11962 0.12271 0.975 0.3369
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.04338 on 32 degrees of freedom
## Multiple R-squared: 0.9879, Adjusted R-squared: 0.9823
## F-statistic: 174.8 on 15 and 32 DF, p-value: < 2.2e-16
##
## AIC: -150.4599

## Group: ALC1KO siPARP1
##
## Call:
## lm(formula = NormCounts2 ~ poly(Olaparib, 3) * GSID, data = dataset)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.085863 -0.019458 0.001602 0.013273 0.098286
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.69316 0.01252 55.347 < 2e-16 ***
## poly(Olaparib, 3)1 -1.81786 0.08677 -20.951 < 2e-16 ***
## poly(Olaparib, 3)2 -0.52092 0.08677 -6.004 1.07e-06 ***
## poly(Olaparib, 3)3 0.10199 0.08677 1.175 0.248501
## GSIDWT siCtrl 0.03358 0.01771 1.896 0.067063 .
## GSIDWT siPARP1 0.06631 0.01771 3.744 0.000715 ***
## GSIDALC1KO siCtrl -0.28791 0.01771 -16.256 < 2e-16 ***
## poly(Olaparib, 3)1:GSIDWT siCtrl 0.01077 0.12271 0.088 0.930606
## poly(Olaparib, 3)2:GSIDWT siCtrl -0.22368 0.12271 -1.823 0.077678 .
## poly(Olaparib, 3)3:GSIDWT siCtrl 0.04756 0.12271 0.388 0.700875
## poly(Olaparib, 3)1:GSIDWT siPARP1 0.41407 0.12271 3.374 0.001952 **
## poly(Olaparib, 3)2:GSIDWT siPARP1 0.04205 0.12271 0.343 0.734086
## poly(Olaparib, 3)3:GSIDWT siPARP1 -0.35490 0.12271 -2.892 0.006825 **
## poly(Olaparib, 3)1:GSIDALC1KO siCtrl -0.56789 0.12271 -4.628 5.84e-05 ***
## poly(Olaparib, 3)2:GSIDALC1KO siCtrl 1.25247 0.12271 10.207 1.37e-11 ***
## poly(Olaparib, 3)3:GSIDALC1KO siCtrl -0.11962 0.12271 -0.975 0.336948
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.04338 on 32 degrees of freedom
## Multiple R-squared: 0.9879, Adjusted R-squared: 0.9823
## F-statistic: 174.8 on 15 and 32 DF, p-value: < 2.2e-16
##
## AIC: -150.4599

# suggested result table
kable(output, row.names = T)
| Olaparib1 in WT siCtrl |
-1.8070860260776 |
0.0867680687886442 |
-20.8266249474727 |
3.56837845460282e-20 |
| Olaparib2 in WT siCtrl |
-0.744604844400641 |
0.0867680687886442 |
-8.58155373049045 |
8.3152942771629e-10 |
| Olaparib3 in WT siCtrl |
0.149550794521518 |
0.0867680687886442 |
1.72356947215 |
0.094436460196784 |
| Olaparib1: WT siCtrl vs. WT siPARP1 |
0.40329970462228 |
0.122708579661822 |
3.28664634317951 |
0.00246492782526375 |
| Olaparib2: WT siCtrl vs. WT siPARP1 |
0.265730806847873 |
0.122708579661822 |
2.16554382407661 |
0.0379076081403378 |
| Olaparib3: WT siCtrl vs. WT siPARP1 |
-0.402465737028792 |
0.122708579661822 |
-3.27985001650222 |
0.00250963486123093 |
| Olaparib1: WT siCtrl vs. ALC1KO siCtrl |
-0.578658188326406 |
0.122708579661822 |
-4.71571091378577 |
4.53202364757456e-05 |
| Olaparib2: WT siCtrl vs. ALC1KO siCtrl |
1.4761548220362 |
0.122708579661822 |
12.0297604788874 |
2.0539478163982e-13 |
| Olaparib3: WT siCtrl vs. ALC1KO siCtrl |
-0.167184587439239 |
0.122708579661822 |
-1.36245230692091 |
0.182568168211289 |
| Olaparib1: WT siCtrl vs. ALC1KO siPARP1 |
-0.0107701456722134 |
0.122708579661822 |
-0.0877701111193306 |
0.930606362706263 |
| Olaparib2: WT siCtrl vs. ALC1KO siPARP1 |
0.223681968066194 |
0.122708579661822 |
1.82287146247352 |
0.0776781922690946 |
| Olaparib3: WT siCtrl vs. ALC1KO siPARP1 |
-0.0475624790397321 |
0.122708579661822 |
-0.387605163150055 |
0.700874528002675 |
|
|
|
|
|
|
Estimate |
Std. Error |
t value |
Pr(>|t|) |
| Olaparib1 in WT siPARP1 |
-1.40378632145532 |
0.0867680687886443 |
-16.1786051142243 |
5.81149956205918e-17 |
| Olaparib2 in WT siPARP1 |
-0.478874037552769 |
0.0867680687886443 |
-5.51901228456799 |
4.38704573342403e-06 |
| Olaparib3 in WT siPARP1 |
-0.252914942507273 |
0.0867680687886443 |
-2.91483890373706 |
0.00644783187258956 |
| Olaparib1: WT siPARP1 vs. WT siCtrl |
-0.40329970462228 |
0.122708579661822 |
-3.28664634317951 |
0.00246492782526375 |
| Olaparib2: WT siPARP1 vs. WT siCtrl |
-0.265730806847873 |
0.122708579661822 |
-2.16554382407661 |
0.0379076081403379 |
| Olaparib3: WT siPARP1 vs. WT siCtrl |
0.402465737028792 |
0.122708579661822 |
3.27985001650222 |
0.00250963486123093 |
| Olaparib1: WT siPARP1 vs. ALC1KO siCtrl |
-0.981957892948686 |
0.122708579661822 |
-8.00235725696527 |
3.90057672915589e-09 |
| Olaparib2: WT siPARP1 vs. ALC1KO siCtrl |
1.21042401518832 |
0.122708579661822 |
9.86421665481077 |
3.16430719712426e-11 |
| Olaparib3: WT siPARP1 vs. ALC1KO siCtrl |
0.235281149589553 |
0.122708579661822 |
1.9173977095813 |
0.0641512738454839 |
| Olaparib1: WT siPARP1 vs. ALC1KO siPARP1 |
-0.414069850294493 |
0.122708579661822 |
-3.37441645429884 |
0.00195194161343676 |
| Olaparib2: WT siPARP1 vs. ALC1KO siPARP1 |
-0.0420488387816784 |
0.122708579661822 |
-0.342672361603097 |
0.734085758416724 |
| Olaparib3: WT siPARP1 vs. ALC1KO siPARP1 |
0.35490325798906 |
0.122708579661822 |
2.89224485335216 |
0.00682527691914667 |
|
|
|
|
|
|
Estimate |
Std. Error |
t value |
Pr(>|t|) |
| Olaparib1 in ALC1KO siCtrl |
-2.38574421440401 |
0.0867680687886442 |
-27.4956472779793 |
7.80408902985544e-24 |
| Olaparib2 in ALC1KO siCtrl |
0.731549977635554 |
0.0867680687886443 |
8.43109669085196 |
1.23731802786328e-09 |
| Olaparib3 in ALC1KO siCtrl |
-0.01763379291772 |
0.0867680687886442 |
-0.203229058384066 |
0.840242795391438 |
| Olaparib1: ALC1KO siCtrl vs. WT siCtrl |
0.578658188326407 |
0.122708579661822 |
4.71571091378577 |
4.53202364757452e-05 |
| Olaparib2: ALC1KO siCtrl vs. WT siCtrl |
-1.4761548220362 |
0.122708579661822 |
-12.0297604788874 |
2.05394781639819e-13 |
| Olaparib3: ALC1KO siCtrl vs. WT siCtrl |
0.167184587439238 |
0.122708579661822 |
1.36245230692091 |
0.182568168211289 |
| Olaparib1: ALC1KO siCtrl vs. WT siPARP1 |
0.981957892948685 |
0.122708579661822 |
8.00235725696527 |
3.90057672915593e-09 |
| Olaparib2: ALC1KO siCtrl vs. WT siPARP1 |
-1.21042401518832 |
0.122708579661822 |
-9.86421665481078 |
3.16430719712424e-11 |
| Olaparib3: ALC1KO siCtrl vs. WT siPARP1 |
-0.235281149589553 |
0.122708579661822 |
-1.91739770958131 |
0.0641512738454837 |
| Olaparib1: ALC1KO siCtrl vs. ALC1KO siPARP1 |
0.567888042654192 |
0.122708579661822 |
4.62794080266644 |
5.84009600713273e-05 |
| Olaparib2: ALC1KO siCtrl vs. ALC1KO siPARP1 |
-1.25247285397 |
0.122708579661822 |
-10.2068890164139 |
1.370407310815e-11 |
| Olaparib3: ALC1KO siCtrl vs. ALC1KO siPARP1 |
0.119622108399506 |
0.122708579661822 |
0.974847143770854 |
0.336948267843165 |
|
|
|
|
|
|
Estimate |
Std. Error |
t value |
Pr(>|t|) |
| Olaparib1 in ALC1KO siPARP1 |
-1.81785617174982 |
0.0867680687886443 |
-20.9507506289886 |
2.9879004313695e-20 |
| Olaparib2 in ALC1KO siPARP1 |
-0.520922876334447 |
0.0867680687886443 |
-6.00362418579751 |
1.07410765578824e-06 |
| Olaparib3 in ALC1KO siPARP1 |
0.101988315481786 |
0.0867680687886442 |
1.17541299357735 |
0.248501265566575 |
| Olaparib1: ALC1KO siPARP1 vs. WT siCtrl |
0.0107701456722135 |
0.122708579661822 |
0.0877701111193314 |
0.930606362706263 |
| Olaparib2: ALC1KO siPARP1 vs. WT siCtrl |
-0.223681968066194 |
0.122708579661822 |
-1.82287146247352 |
0.077678192269095 |
| Olaparib3: ALC1KO siPARP1 vs. WT siCtrl |
0.0475624790397322 |
0.122708579661822 |
0.387605163150055 |
0.700874528002675 |
| Olaparib1: ALC1KO siPARP1 vs. WT siPARP1 |
0.414069850294493 |
0.122708579661822 |
3.37441645429884 |
0.00195194161343675 |
| Olaparib2: ALC1KO siPARP1 vs. WT siPARP1 |
0.0420488387816784 |
0.122708579661822 |
0.342672361603097 |
0.734085758416724 |
| Olaparib3: ALC1KO siPARP1 vs. WT siPARP1 |
-0.35490325798906 |
0.122708579661822 |
-2.89224485335216 |
0.00682527691914668 |
| Olaparib1: ALC1KO siPARP1 vs. ALC1KO siCtrl |
-0.567888042654193 |
0.122708579661822 |
-4.62794080266644 |
5.84009600713276e-05 |
| Olaparib2: ALC1KO siPARP1 vs. ALC1KO siCtrl |
1.25247285397 |
0.122708579661822 |
10.2068890164139 |
1.37040731081499e-11 |
| Olaparib3: ALC1KO siPARP1 vs. ALC1KO siCtrl |
-0.119622108399506 |
0.122708579661822 |
-0.974847143770858 |
0.336948267843163 |
write.table(output, file = "FigureS1E_Stats_New_All.txt", quote = F, sep = "\t", row.names = T, col.names = NA)